home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Graphics / QuickDraw GX / IW-Half-Dither / source / CommonDefines.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.8 KB  |  95 lines  |  [TEXT/MPS ]

  1. /*
  2.     copyright © 1992-1994 Apple Computer Inc.  All rights reserved.
  3.     
  4.     CommonDefines.h
  5.     This file defines values used by more than one .r or .h file.
  6.     
  7.     Modification history
  8.  
  9.      8/26/94        dmh                Sync'd with the shipping 1.0.1 GX driver.
  10.     12/20/93        dmh                Sync'd with the shipping 1.0b3 GX driver.
  11.      7/23/92        TED                New file today
  12.     
  13. */
  14.  
  15.  
  16.  
  17. // driver info
  18. #define DriverName        "IW-Half-Dither"
  19. #define DriverType         'pdvr'
  20. #define DriverCreator     'Dipy'
  21.  
  22. // code segment info
  23. #define DriverSegType    DriverType
  24. #define NewSegID        0
  25. #define OldSegID        1
  26.  
  27. // resource IDs for STR#s
  28. #define    kFormatModeFontsID                gxPrintingDriverBaseID        // List of "native" mode fonts supported
  29. #define    kFormatModeStylesID                (gxPrintingDriverBaseID + 1)    //    List of "well" known styles that are supported
  30. #define kOldQualityID                    (gxPrintingDriverBaseID + 2)
  31. #define kNewQualityID                    (gxPrintingDriverBaseID + 3)
  32. #define    kBoldStyle                        1                            //    Index into kFormatModeStylesID 'STR#' of the bold style string
  33. #define    kUnderlineStyle                    2                            //    Index into kFormatModeStylesID 'STR#' of the underline style string
  34. #define kBestString                        1
  35. #define kRoughString                    2
  36.  
  37.  
  38. // status information
  39. #define kDriverStatus        gxPrintingDriverBaseID    // stat resource ID
  40. #define kSendingData        1                        // item number for sending data
  41. #define kCheckOnline        2                        // item number for printer offline
  42.  
  43. // options, placed into the job collection
  44. #define kSuperRes            0x1                // highest res possible (160X144, 80X72)
  45.  
  46.  
  47. #define kSeperationPanelID -27640
  48. #define kDitherPanelID -27639
  49.  
  50. #define kCMYKRenderCollectionType 'Dipy'
  51. #define kCMYKRenderCollectionID   0
  52.  
  53.  
  54. // do the following only if we aren't running in Rez
  55.  
  56. #ifndef REZ
  57.     
  58.     #define nrequire(assertion, exception)          \
  59.                 if (assertion)                      \
  60.                 {                                   \
  61.                     goto exception;                 \
  62.                 }
  63.     
  64.     #define require(assertion, exception)           \
  65.                 if (assertion)                      \
  66.                     ;                               \
  67.                 else                                \
  68.                 {                                   \
  69.                     goto exception;                 \
  70.                 }
  71.     
  72.     
  73.     
  74.     
  75.     #define kNoPackagingOptions    0
  76.     #define kDoSmallLineFeeds    0x1
  77.     
  78.     // own own global storage
  79.     typedef struct
  80.         {
  81.         long    leftMargin;            // margin at left edge of page
  82.         long    lineFeeds;            // accumulated lines feeds
  83.         long    packagingOptions;    // controls packaging and escape generation
  84.         ResType    commType;            // type of communications
  85.         Handle     draftTable;            // table for driving draft output, nil when not loaded
  86.         Boolean    isImageWriterII;    // is this an ImageWriter II?
  87.         Boolean idleQuery;            // is it time to query during idles?
  88.         OSErr    idleError;            // error to return from the next idle
  89.         long    idleTimeout;        // timeout on idles for the query
  90.         Boolean    timeoutPending;        // timeout is pending
  91.         } SpecGlobals, *SpecGlobalsPtr, **SpecGlobalsHdl;
  92.         
  93.  
  94. #endif
  95.